package com.teamcenter.rac.massupdate.ui.grid;

import java.util.LinkedHashMap;
import java.util.Map;
@SuppressWarnings({"rawtypes","unchecked"})
public class GridModel
{
  private GridColumn[] m_columns;
  private Map<String, String> m_propertyToLabelMap;
  public boolean enableFullRowSelection = true;
  
  public GridModel(GridColumn[] paramArrayOfGridColumn)
  {
    this.m_columns = paramArrayOfGridColumn;
    setPropertyNameToLabelMap();
  }
  
  public GridColumn[] getColumns()
  {
    return this.m_columns;
  }
  
  private void setPropertyNameToLabelMap()
  {
    this.m_propertyToLabelMap = new LinkedHashMap(this.m_columns.length);
    GridColumn[] arrayOfGridColumn;
    int j = (arrayOfGridColumn = this.m_columns).length;
    for (int i = 0; i < j; i++)
    {
      GridColumn localGridColumn = arrayOfGridColumn[i];
      this.m_propertyToLabelMap.put(localGridColumn.getName(), localGridColumn.getDisplayName());
    }
  }
  
  public Map<String, String> getPropertyToLabelMap()
  {
    return this.m_propertyToLabelMap;
  }
  
  public String[] getPropertyNames()
  {
    return (String[])this.m_propertyToLabelMap.keySet().toArray(new String[this.m_columns.length]);
  }
}

